from django import forms
from django.db import models

# Create your models here.
class SexType(models.IntegerChoices):
    Male = 1, "男性"
    Female = 0, "女性"
    
class DelType(models.IntegerChoices):
    Male = 1, "是"
    Female = 0, "否"
    
class User(models.Model):
    name = models.CharField(max_length=20, null=False)
    mobile = models.CharField(max_length=11, null=False)
    is_del = models.SmallIntegerField(default=0, choices=DelType.choices)
    sex = models.SmallIntegerField(verbose_name="性别", max_length=1, choices=SexType.choices)
    
    def __str__(self):
        return self.name
    
class Gender(models.Model):
    CHOICES = (
        ('M', 'Male'),
        ('F', 'Female'),
    )
    gender = models.CharField(max_length=1, choices=CHOICES)